#ifndef LOGGER_HPP
#define LOGGER_HPP

class Logger {
public:
    virtual void notice(char *message) = 0;
    virtual void warning(char *message) = 0;
    virtual void alert(char *message) = 0;
    virtual void error(int err_code) = 0;
};

class TextLogger : public Logger {
public:
    class Portable {
    public:
        virtual int write(void *buff,int size) = 0;
    };
public:
    TextLogger(Portable *portable);
    virtual void notice(char *message);
    virtual void warning(char *message);
    virtual void alert(char *message);
    virtual void error(int err_code);
protected:
    Portable *portable;
};

class BinaryLogger : public Logger {
public:
    class Portable {
    public:
        virtual int read(void *buff,unsigned int address,int size) = 0;
        virtual int write(void *buff,unsigned int address,int size) = 0;
    };
public:
    BinaryLogger(Portable *portable);
    virtual void notice(char *message);
    virtual void warning(char *message);
    virtual void alert(char *message);
    virtual void error(int err_code);
protected:
    Portable *portable;
};

#endif
